﻿using System;
using VisualWip.Core.Columns;

namespace VisualWip.Core
{
    internal class ColumnPositioner
    {
        public static void CalculatePosition(Column column, Window window)
        {
            int maxPositionX = 0;
            foreach (Column col in window.WindowColumns)
                maxPositionX = Math.Max(maxPositionX, (col.PositionX + col.Width));

            column.PositionX = maxPositionX;
        }
    }
}